package com.javaee.lpr.service.Impl;

import com.javaee.lpr.entity.Carsinfo;
import com.javaee.lpr.mapper.CarsinfoMapper;
import com.javaee.lpr.service.CarsinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CarsinfoServiceImpl implements CarsinfoService {
    @Autowired
    private CarsinfoMapper carsinfoMapper;

    @Override
    public Integer insertCars(Carsinfo carsinfo) {
        Integer insert = carsinfoMapper.insert(carsinfo);
        return insert;
    }

    @Override
    public Integer deleteByPlate(String plate) {
        Integer integer = carsinfoMapper.deleteByPlate(plate);
        return integer;
    }

    @Override
    public Carsinfo queryCar(String plate) {
        Carsinfo carsinfo = carsinfoMapper.selectByPlate(plate);
        return carsinfo;
    }
}
